Lisk Service Events
Service events provider, you can access last block, forgers, fee estimates, transactions and round, through the useServiceEvents()
hook.
+ import { ServiceEventsProvider } from "@moosty/lisk-service-events"
const App = () => {
return (
<LiskServiceProvider endpoints={targetNetwork}>
+ <ServiceEventsProvider>
<... />
+ </ServiceEventsProvider>
</LiskServiceProvider>)
}
Usage
import { useServiceEvents } from "@moosty/lisk-service-events"
const Component = () => {
const {block, forgers, feeEstimates, transactions, round} = useServiceEvents()
}
This package exports:
import {
ServiceEventsProvider,
useServiceEvents,
ServiceEventsProps,
BlockType,
FeeEstimatesType,
ForgersType,
RoundType,
TransactionsType
} from "@moosty/lisk-service-events"